#include "StdAfx.h"
#include ".\lsystestclass.h"

LsysTestClass::LsysTestClass(void)
{
	m_nMaxLevels = 5;
	m_branchRule.SetRandomly();

	int nEntries = m_branchRule.GetProbArrNumEnts(m_nMaxLevels);

	m_arrParamVectors = new ParamVector[nEntries];

	m_branchRule.RandomlySetParamArr(m_nMaxLevels, m_arrParamVectors);
}

LsysTestClass::~LsysTestClass(void)
{
	if(m_arrParamVectors)
	{
		delete [] m_arrParamVectors;
	}
	m_arrParamVectors = NULL;
}

void LsysTestClass::Draw()
{
	m_branchRule.Draw(m_nMaxLevels, m_arrParamVectors);
}

void LsysTestClass::ReRandomize()
{
	m_branchRule.PrettyRandomize();
	//m_branchRule.SetRandomly();
	m_branchRule.RandomlySetParamArr(m_nMaxLevels, m_arrParamVectors);
}
